
import javax.swing.JFrame;
import javax.swing.JTextArea;

/**
 *
 * @author Laurent Albessart
 * @version 2-jan-2012
 */
public class MyDebugger {

    private MyDebuggerTypes TYPE = MyDebuggerTypes.NONE;
    private static MyDebugger instance = new MyDebugger();
    
    private JFrame debugWindow;
    private JTextArea debugText;

    private MyDebugger() {
        debugWindow = new JFrame("Debug");
        //TODO finish this class
        setTYPE(MyDebuggerTypes.COMMANDLINE.name());
    }

    public static MyDebugger getInstance() {
        return instance;
    }

    public void setTYPE(String type) {
        this.TYPE = MyDebuggerTypes.valueOf(type);
        if (TYPE.equals(MyDebuggerTypes.WINDOW)) {
            debugWindow.setVisible(true);
        } else {
            debugWindow.setVisible(false);
        }
    }
}

enum MyDebuggerTypes {

    NONE,
    COMMANDLINE,
    WINDOW;
}
